<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<c:url value='/css/style.css'/>" rel="stylesheet"
	type="text/css" />
<fmt:setBundle basename="messages" />
<title><fmt:message key="title" />
</title>
</head>
<body>
<%@ include file="Header.jsp"%>
		<table cellspacing="2" cellpadding="1" border="1" align="center" width="100%">
		<tr>
			<td width="300px" style="vertical-align: top"><%@ include file="Menu.jsp"%></td>
			<td>
	<p>
	<h3>
		<fmt:message key="table.title.old.leave" />
	</h3>
	<c:choose>
		<c:when test="${not empty oldleaves}">
			<table class="borderAll" width="100%">
				<tr>
					<th><fmt:message key="table.lable.leave.reference" />
					</th>
					<th><fmt:message key="table.lable.leave.empid" />
					</th>
					<th><fmt:message key="table.lable.leave.empname" />
					</th>
					<th><fmt:message key="table.lable.leave.leavetype" />
					</th>
					<th><fmt:message key="table.lable.leave.from" /></th>
					<th><fmt:message key="table.lable.leave.to" />
					</th>
					<th><fmt:message key="table.lable.leave.status" />
					</th>
					<th><fmt:message key="table.lable.leave.viewdetail" />
					</th>
				</tr>

				<c:forEach var="oldleave" items="${oldleaves}" varStatus="status">
					<tr class="${status.index%2==0?'even':'odd'}">
						<td class="nowrap">${oldleave.leaveId}</td>
						<td class="nowrap">${oldleave.employeeId}</td>
						<td class="nowrap">${oldleave.employeeName}</td>
						<td class="nowrap">${oldleave.leaveType}</td>
						<td class="nowrap">${oldleave.leaveStartDate}</td>
						<td class="nowrap">${oldleave.leaveEndDate}</td>
						<td class="nowrap">${oldleave.status}</td>
						<td class="nowrap"><c:url var="viewdetail" scope="page"
								value="/viewleaveapplication">
								<c:param name="leaveid" value="${oldleave.leaveId}" />
								<c:param name="readonly" value="true" />
							</c:url> <a href="${viewdetail}"><fmt:message
									key="table.lable.leave.viewdetail" />
						</a></td>
					</tr>
				</c:forEach>

			</table>
		</c:when>
		<c:otherwise>
			<fmt:message key="table.lable.leave.notfound" />
		</c:otherwise>
	</c:choose>
	<p>
	<h3>
		<fmt:message key="table.title.new.leave" />
	</h3>
	<c:choose>
		<c:when test="${not empty newleaves}">
			<table class="borderAll" width="100%">
				<tr>
					<th><fmt:message key="table.lable.leave.reference" />
					</th>
					<th><fmt:message key="table.lable.leave.empid" />
					</th>
					<th><fmt:message key="table.lable.leave.empname" />
					</th>
					<th><fmt:message key="table.lable.leave.leavetype" />
					</th>
					<th><fmt:message key="table.lable.leave.from" /></th>
					<th><fmt:message key="table.lable.leave.to" />
					</th>
					<th><fmt:message key="table.lable.leave.status" />
					</th>
					<th><fmt:message key="table.lable.leave.viewdetail" />
					</th>
				</tr>
				<c:forEach var="newleave" items="${newleaves}" varStatus="status">
					<tr class="${status.index%2==0?'even':'odd'}">
						<td class="nowrap">${newleave.leaveId}</td>
						<td class="nowrap">${newleave.employeeId}</td>
						<td class="nowrap">${newleave.employeeName}</td>
						<td class="nowrap">${newleave.leaveType}</td>
						<td class="nowrap">${newleave.leaveStartDate}</td>
						<td class="nowrap">${newleave.leaveEndDate}</td>
						<td class="nowrap">${newleave.status}</td>
						<td class="nowrap"><c:url var="viewdetail" scope="page"
								value="/viewleaveapplication">
								<c:param name="leaveid" value="${newleave.leaveId}" />

							</c:url> <a href="${viewdetail}"><fmt:message
									key="table.lable.leave.viewdetail" />
						</a></td>
					</tr>
				</c:forEach>
			</table>
		</c:when>
		<c:otherwise>
			<fmt:message key="table.lable.leave.notfound" />
		</c:otherwise>
	</c:choose>
</td></tr></table>
</body>
</html>